home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 November / SGI Freeware 1999 November - Disc 2.iso / dist / fw_screen.idb / usr / freeware / info / screen.info-2.z / screen.info-2 (.txt)
GNU Info File  |  1998-10-27  |  51KB  |  965 lines

  1. This is Info file screen.info, produced by Makeinfo-1.55 from the input
  2. file ./screen.texinfo.
  3.    This file documents the `Screen' virtual terminal manager.
  4.    Copyright (c) 1993 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided that
  10. the entire resulting derived work is distributed under the terms of a
  11. permission notice identical to this one.
  12.    Permission is granted to copy and distribute translations of this
  13. manual into another language, under the above conditions for modified
  14. versions, except that this permission notice may be stated in a
  15. translation approved by the Foundation.
  16. File: screen.info,  Node: Naming Windows,  Next: Console,  Up: Window Settings
  17. Naming Windows (Titles)
  18. =======================
  19.    You can customize each window's name in the window display (viewed
  20. with the `windows' command (*note Windows::.) by setting it with one of
  21. the title commands.  Normally the name displayed is the actual command
  22. name of the program created in the window.  However, it is sometimes
  23. useful to distinguish various programs of the same name or to change
  24. the name on-the-fly to reflect the current state of the window.
  25.    The default name for all shell windows can be set with the
  26. `shelltitle' command (*note Shell::.).  You can specify the name you
  27. want for a window with the `-t' option to the `screen' command when the
  28. window is created (*note Screen Command::.).  To change the name after
  29. the window has been created you can use the title-string escape-sequence
  30. (`ESC k NAME ESC \') and the `title' command (C-a A).  The former can
  31. be output from an application to control the window's name under
  32. software control, and the latter will prompt for a name when typed.
  33. You can also bind predefined names to keys with the `title' command to
  34. set things quickly without prompting.
  35. * Menu:
  36. * Title Command::                 The `title' command.
  37. * Dynamic Titles::                Make shell windows change titles dynamically.
  38. * Title Prompts::                 Set up your shell prompt for dynamic Titles.
  39. * Title Screenrc::                Set up Titles in your `.screenrc'.
  40. File: screen.info,  Node: Title Command,  Next: Dynamic Titles,  Up: Naming Windows
  41. Title Command
  42. -------------
  43.  - Command: title [WINDOWTITLE]
  44.      (`C-a A')
  45.      Set the name of the current window to WINDOWALIAS. If no name is
  46.      specified, screen prompts for one.
  47. File: screen.info,  Node: Dynamic Titles,  Next: Title Prompts,  Prev: Title Command,  Up: Naming Windows
  48. Dynamic Titles
  49. --------------
  50.    `screen' has a shell-specific heuristic that is enabled by setting
  51. the window's name to SEARCH|NAME and arranging to have a null title
  52. escape-sequence output as a part of your prompt.  The SEARCH portion
  53. specifies an end-of-prompt search string, while the NAME portion
  54. specifies the default shell name for the window.  If the NAME ends in a
  55. `:' `screen' will add what it believes to be the current command
  56. running in the window to the end of the specified name (e.g. NAME:CMD).
  57. Otherwise the current command name supersedes the shell name while it
  58. is running.
  59.    Here's how it works: you must modify your shell prompt to output a
  60. null title-escape-sequence (ESC k ESC \) as a part of your prompt.  The
  61. last part of your prompt must be the same as the string you specified
  62. for the SEARCH portion of the title.  Once this is set up, `screen'
  63. will use the title-escape-sequence to clear the previous command name
  64. and get ready for the next command.  Then, when a newline is received
  65. from the shell, a search is made for the end of the prompt.  If found,
  66. it will grab the first word after the matched string and use it as the
  67. command name.  If the command name begins with `!', `%', or `^',
  68. `screen' will use the first word on the following line (if found) in
  69. preference to the just-found name.  This helps csh users get more
  70. accurate titles when using job control or history recall commands.
  71. File: screen.info,  Node: Title Prompts,  Next: Title Screenrc,  Prev: Dynamic Titles,  Up: Naming Windows
  72. Setting up your prompt for shell titles
  73. ---------------------------------------
  74.    One thing to keep in mind when adding a null title-escape-sequence
  75. to your prompt is that some shells (like the csh) count all the
  76. non-control characters as part of the prompt's length.  If these
  77. invisible characters aren't a multiple of 8 then backspacing over a tab
  78. will result in an incorrect display.  One way to get around this is to
  79. use a prompt like this:
  80.      set prompt='
  81. [0000m
  82.    The escape-sequence `
  83. [0000m' not only normalizes the character
  84. attributes, but all the zeros round the length of the invisible
  85. characters up to 8.
  86.    Tcsh handles escape codes in the prompt more intelligently, so you
  87. can specify your prompt like this:
  88.      set prompt="%{\ek\e\\%}\% "
  89.    Bash users will probably want to echo the escape sequence in the
  90. PROMPT_COMMAND:
  91.      PROMPT_COMMAND='echo -n -e "\033k\033\134"'
  92.    (I used `\134' to output a `\' because of a bug in v1.04).
  93. File: screen.info,  Node: Title Screenrc,  Prev: Title Prompts,  Up: Naming Windows
  94. Setting up shell titles in your `.screenrc'
  95. -------------------------------------------
  96.    Here are some .screenrc examples:
  97.      screen -t top 2 nice top
  98.    Adding this line to your .screenrc would start a niced version of the
  99. `top' command in window 2 named `top' rather than `nice'.
  100.      shelltitle '> |csh'
  101.      screen 1
  102.    This file would start a shell using the given shelltitle.  The title
  103. specified is an auto-title that would expect the prompt and the typed
  104. command to look something like the following:
  105.      /usr/joe/src/dir> trn
  106.    (it looks after the '> ' for the command name).  The window status
  107. would show the name `trn' while the command was running, and revert to
  108. `csh' upon completion.
  109.      bind R screen -t '% |root:' su
  110.    Having this command in your .screenrc would bind the key sequence
  111. `C-a R' to the `su' command and give it an auto-title name of `root:'.
  112. For this auto-title to work, the screen could look something like this:
  113.      % !em
  114.      emacs file.c
  115.    Here the user typed the csh history command `!em' which ran the
  116. previously entered `emacs' command.  The window status would show
  117. `root:emacs' during the execution of the command, and revert to simply
  118. `root:' at its completion.
  119.      bind o title
  120.      bind E title ""
  121.      bind u title (unknown)
  122.    The first binding doesn't have any arguments, so it would prompt you
  123. for a title when you type `C-a o'.  The second binding would clear an
  124. auto-titles current setting (C-a E).  The third binding would set the
  125. current window's title to `(unknown)' (C-a u).
  126. File: screen.info,  Node: Console,  Next: Kill,  Prev: Naming Windows,  Up: Window Settings
  127. Console
  128. =======
  129.  - Command: console [STATE]
  130.      (none)
  131.      Grabs or ungrabs the machines console output to a window. When the
  132.      argument is omitted the current state is displayed.  *Note*: Only
  133.      the owner of `/dev/console' can grab the console output. This
  134.      command is only available if the host supports the ioctl
  135.      `TIOCCONS'.
  136. File: screen.info,  Node: Kill,  Next: Login,  Prev: Console,  Up: Window Settings
  137.  - Command: kill
  138.      (`C-a k', `C-a C-k')
  139.      Kill the current window.
  140.      If there is an `exec' command running (*note Exec::.) then it is
  141.      killed.  Otherwise the process (e.g. shell) running in the window
  142.      receives a `HANGUP' condition, the window structure is removed and
  143.      screen switches to the previously displayed window. When the last
  144.      window is destroyed, `screen' exits.
  145.      *Caution*: `emacs' users may find themselves killing their `emacs'
  146.      session when trying to delete the current line.  For this reason,
  147.      it is probably wise to use a different command character (*note
  148.      Command Character::.) or rebind `kill' to another key sequence,
  149.      such as `C-a K' (*note Key Binding::.).
  150. File: screen.info,  Node: Login,  Next: Mode,  Prev: Kill,  Up: Window Settings
  151. Login
  152. =====
  153.  - Command: deflogin STATE
  154.      (none)
  155.      Same as the `login' command except that the default setting for new
  156.      windows is changed.  This defaults to `on' unless otherwise
  157.      specified at compile time (*note Installation::.). Both commands
  158.      are only present when `screen' has been compiled with utmp support.
  159.  - Command: login [STATE]
  160.      (`C-a L')
  161.      Adds or removes the entry in `/etc/utmp' for the current window.
  162.      This controls whether or not the window is "logged in".  In
  163.      addition to this toggle, it is convenient to have "log in" and
  164.      "log out" keys.  For instance, `bind I login on' and `bind O login
  165.      off' will map these keys to be `C-a I' and `C-a O' (*note Key
  166.      Binding::.).
  167. File: screen.info,  Node: Mode,  Next: Monitor,  Prev: Login,  Up: Window Settings
  168.  - Command: defmode MODE
  169.      (none)
  170.      The mode of each newly allocated pseudo-tty is set to MODE.  MODE
  171.      is an octal number as used by chmod(1).  Defaults to 0622 for
  172.      windows which are logged in, 0600 for others (e.g. when `-ln' was
  173.      specified for creation. *Note Screen Command::).
  174. File: screen.info,  Node: Monitor,  Next: Windows,  Prev: Mode,  Up: Window Settings
  175. Monitoring
  176. ==========
  177.  - Command: activity MESSAGE
  178.      (none)
  179.      When any activity occurs in a background window that is being
  180.      monitored, `screen' displays a notification in the message line.
  181.      The notification message can be redefined by means of the
  182.      `activity' command.  Each occurrence of `%' in MESSAGE is replaced
  183.      by the number of the window in which activity has occurred, and
  184.      each occurrence of `~' is replaced by the definition for bell in
  185.      your termcap (usually an audible bell).  The default message is
  186.           'Activity in window %'
  187.      Note that monitoring is off for all windows by default, but can be
  188.      altered by use of the `monitor' command (`C-a M').
  189.  - Command: defmonitor STATE
  190.      (none)
  191.      Same as the `monitor' command except that the default setting for
  192.      new windows is changed.  Initial setting is `off'.
  193.  - Command: monitor [STATE]
  194.      (`C-a M')
  195.      Toggles monitoring of the current window.  When monitoring is
  196.      turned on and the affected window is switched into the background,
  197.      the activity notification message will be displayed in the status
  198.      line at the first sign of output, and the window will also be
  199.      marked with an `@' in the window-status display (*note
  200.      Windows::.).  Monitoring defaults to `off' for all windows.
  201. File: screen.info,  Node: Windows,  Next: Hardstatus,  Prev: Monitor,  Up: Window Settings
  202. Windows
  203. =======
  204.  - Command: windows
  205.      (`C-a w', `C-a C-w')
  206.      Uses the message line to display a list of all the windows.  Each
  207.      window is listed by number with the name of the program running in
  208.      the window (or its title); the current window is marked with a `*';
  209.      the previous window is marked with a `-'; all the windows that are
  210.      logged in are marked with a `$' (*note Login::.); a background
  211.      window that has received a bell is marked with a `!'; a background
  212.      window that is being monitored and has had activity occur is
  213.      marked with an `@' (*note Monitor::.); a window which has output
  214.      logging turned on is marked with `(L)'; windows occupied by other
  215.      users are marked with `&'; windows in the zombie state are marked
  216.      with `Z'.  If this list is too long to fit on the terminal's
  217.      status line only the portion around the current window is
  218.      displayed.
  219. File: screen.info,  Node: Hardstatus,  Prev: Windows,  Up: Window Settings
  220. Hardstatus
  221. ==========
  222.    `Screen' maintains a hardstatus line for every window. If a window
  223. gets selected, the display's hardstatus will be updated to match the
  224. window's hardstatus line. If the display has no hardstatus the line
  225. will be displayed as a standard screen message.  The hardstatus line
  226. can be changed with the ANSI Application Program Command (APC):
  227. `ESC_<string>ESC\'. As a convenience for xterm users the sequence
  228. `ESC]0..2;<string>^G' is also accepted.
  229.  - Command: defhstatus
  230.      (none)
  231.      The hardstatus line that all new windows will get is set to STATUS.
  232.      This command is useful to make the hardstatus of every window
  233.      display the window number or title or the like.  STATUS may
  234.      contain the same directives as in the window messages, but the
  235.      directive escape character is `^E' (octal 005) instead of `%'.
  236.      This was done to make a misinterpretion of program generated
  237.      hardstatus lines impossible.  If the parameter STATUS is omitted,
  238.      the current default string is displayed.  Per default the
  239.      hardstatus line of new windows is empty.
  240. File: screen.info,  Node: Virtual Terminal,  Next: Copy and Paste,  Prev: Window Settings,  Up: Top
  241. Virtual Terminal
  242. ****************
  243.    Each window in a `screen' session emulates a VT100 terminal, with
  244. some extra functions added. The VT100 emulator is hardcoded, no other
  245. terminal types can be emulated.  The commands described here modify the
  246. terminal emulation.
  247. * Menu:
  248. * Control Sequences::           Details of the internal VT100 emulation.
  249. * Input Translation::           How keystrokes are remapped.
  250. * Digraph::            Entering digraph sequences.
  251. * Bell::                        Getting your attention.
  252. * Clear::                       Clear the window display.
  253. * Info::                        Terminal emulation statistics.
  254. * Redisplay::                   When the display gets confusing.
  255. * Wrap::                        Automatic margins.
  256. * Reset::                       Recovering from ill-behaved applications.
  257. * Window Size::                 Changing the size of your terminal.
  258. * Character Processing::    Change the effect of special characters.
  259. File: screen.info,  Node: Control Sequences,  Next: Input Translation,  Up: Virtual Terminal
  260. Control Sequences
  261. =================
  262.    The following is a list of control sequences recognized by `screen'.
  263. `(V)' and `(A)' indicate VT100-specific and ANSI- or ISO-specific
  264. functions, respectively.
  265.      ESC E                           Next Line
  266.      ESC D                           Index
  267.      ESC M                           Reverse Index
  268.      ESC H                           Horizontal Tab Set
  269.      ESC Z                           Send VT100 Identification String
  270.      ESC 7                   (V)     Save Cursor and Attributes
  271.      ESC 8                   (V)     Restore Cursor and Attributes
  272.      ESC [s                  (A)     Save Cursor and Attributes
  273.      ESC [u                  (A)     Restore Cursor and Attributes
  274.      ESC c                           Reset to Initial State
  275.      ESC g                           Visual Bell
  276.      ESC Pn p                        Cursor Visibility (97801)
  277.          Pn = 6                      Invisible
  278.               7                      Visible
  279.      ESC =                   (V)     Application Keypad Mode
  280.      ESC >                   (V)     Numeric Keypad Mode
  281.      ESC # 8                 (V)     Fill Screen with E's
  282.      ESC \                   (A)     String Terminator
  283.      ESC ^                   (A)     Privacy Message String (Message Line)
  284.      ESC !                           Global Message String (Message Line)
  285.      ESC k                           Title Definition String
  286.      ESC P                   (A)     Device Control String
  287.                                      Outputs a string directly to the host
  288.                                      terminal without interpretation.
  289.      ESC _                   (A)     Application Program Command (Hardstatus)
  290.      ESC ]                   (A)     Operating System Command (Hardstatus, xterm
  291.                                      title hack)
  292.      Control-N               (A)     Lock Shift G1 (SO)
  293.      Control-O               (A)     Lock Shift G0 (SI)
  294.      ESC n                   (A)     Lock Shift G2
  295.      ESC o                   (A)     Lock Shift G3
  296.      ESC N                   (A)     Single Shift G2
  297.      ESC O                   (A)     Single Shift G3
  298.      ESC ( Pcs               (A)     Designate character set as G0
  299.      ESC ) Pcs               (A)     Designate character set as G1
  300.      ESC * Pcs               (A)     Designate character set as G2
  301.      ESC + Pcs               (A)     Designate character set as G3
  302.      ESC [ Pn ; Pn H                 Direct Cursor Addressing
  303.      ESC [ Pn ; Pn f                 Direct Cursor Addressing
  304.      ESC [ Pn J                      Erase in Display
  305.            Pn = None or 0            From Cursor to End of Screen
  306.                 1                    From Beginning of Screen to Cursor
  307.                 2                    Entire Screen
  308.      ESC [ Pn K                      Erase in Line
  309.            Pn = None or 0            From Cursor to End of Line
  310.                 1                    From Beginning of Line to Cursor
  311.                 2                    Entire Line
  312.      ESC [ Pn A                      Cursor Up
  313.      ESC [ Pn B                      Cursor Down
  314.      ESC [ Pn C                      Cursor Right
  315.      ESC [ Pn D                      Cursor Left
  316.      ESC [ Ps ;...; Ps m             Select Graphic Rendition
  317.            Ps = None or 0            Default Rendition
  318.                 1                    Bold
  319.                 2            (A)     Faint
  320.                 3            (A)     Standout Mode (ANSI: Italicized)
  321.                 4                    Underlined
  322.                 5                    Blinking
  323.                 7                    Negative Image
  324.                 22           (A)     Normal Intensity
  325.                 23           (A)     Standout Mode off (ANSI: Italicized off)
  326.                 24           (A)     Not Underlined
  327.                 25           (A)     Not Blinking
  328.                 27           (A)     Positive Image
  329.                 30           (A)     Foreground Black
  330.                 31           (A)     Foreground Red
  331.                 32           (A)     Foreground Green
  332.                 33           (A)     Foreground Yellow
  333.                 34           (A)     Foreground Blue
  334.                 35           (A)     Foreground Magenta
  335.                 36           (A)     Foreground Cyan
  336.                 37           (A)     Foreground White
  337.                 39           (A)     Foreground Default
  338.                 40           (A)     Background Black
  339.             ...                  ...
  340.             49           (A)     Background Default
  341.      ESC [ Pn g                      Tab Clear
  342.            Pn = None or 0            Clear Tab at Current Position
  343.                 3                    Clear All Tabs
  344.      ESC [ Pn ; Pn r         (V)     Set Scrolling Region
  345.      ESC [ Pn I              (A)     Horizontal Tab
  346.      ESC [ Pn Z              (A)     Backward Tab
  347.      ESC [ Pn L              (A)     Insert Line
  348.      ESC [ Pn M              (A)     Delete Line
  349.      ESC [ Pn @              (A)     Insert Character
  350.      ESC [ Pn P              (A)     Delete Character
  351.      ESC [ Pn S                      Scroll Scrolling Region Up
  352.      ESC [ Pn T                      Scroll Scrolling Region Down
  353.      ESC [ Ps ;...; Ps h             Set Mode
  354.      ESC [ Ps ;...; Ps l             Reset Mode
  355.            Ps = 4            (A)     Insert Mode
  356.                 20           (A)     `Automatic Linefeed' Mode.
  357.                 34                   Normal Cursor Visibility
  358.                 ?1           (V)     Application Cursor Keys
  359.                 ?3           (V)     Change Terminal Width to 132 columns
  360.                 ?5           (V)     Reverse Video
  361.                 ?6           (V)     `Origin' Mode
  362.                 ?7           (V)     `Wrap' Mode
  363.                 ?25          (V)     Visible Cursor
  364.      ESC [ 5 i               (A)     Start relay to printer (ANSI Media Copy)
  365.      ESC [ 4 i               (A)     Stop relay to printer (ANSI Media Copy)
  366.      ESC [ 8 ; Ph ; Pw t             Resize the window to `Ph' lines and
  367.                                      `Pw' columns (SunView special)
  368.      ESC [ c                         Send VT100 Identification String
  369.      ESC [ x                 (V)     Send Terminal Parameter Report
  370.      ESC [ > c                       Send Secondary Device Attributes String
  371.      ESC [ 6 n                       Send Cursor Position Report
  372. File: screen.info,  Node: Input Translation,  Next: Digraph,  Prev: Control Sequences,  Up: Virtual Terminal
  373. Input Translation
  374. =================
  375.    In order to do a full VT100 emulation `screen' has to detect that a
  376. sequence of characters in the input stream was generated by a keypress
  377. on the user's keyboard and insert the VT100 style escape sequence.
  378. `Screen' has a very flexible way of doing this by making it possible to
  379. map arbitrary commands on arbitrary sequences of characters. For
  380. standard VT100 emulation the command will always insert a string in the
  381. input buffer of the window (see also command `stuff', *note Paste::.).
  382. Because the sequences generated by a keypress can change after a
  383. reattach from a different terminal type, it is possible to bind
  384. commands to the termcap name of the keys.  `Screen' will insert the
  385. correct binding after each reattach. *Note Bindkey:: for further
  386. details on the syntax and examples.
  387.    Here is the table of the default key bindings. (A) means that the
  388. command is executed if the keyboard is switched into application mode.
  389.      Key name        Termcap name    Command
  390.      -----------------------------------------------------
  391.      Cursor up            ku         stuff \033[A
  392.                                      stuff \033OA      (A)
  393.      Cursor down          kd         stuff \033[B
  394.                                      stuff \033OB      (A)
  395.      Cursor right         kr         stuff \033[C
  396.                                      stuff \033OC      (A)
  397.      Cursor left          kl         stuff \033[D
  398.                                      stuff \033OD      (A)
  399.      Function key 0       k0         stuff \033[10~
  400.      Function key 1       k1         stuff \033OP
  401.      Function key 2       k2         stuff \033OQ
  402.      Function key 3       k3         stuff \033OR
  403.      Function key 4       k4         stuff \033OS
  404.      Function key 5       k5         stuff \033[15~
  405.      Function key 6       k6         stuff \033[17~
  406.      Function key 7       k7         stuff \033[18~
  407.      Function key 8       k8         stuff \033[19~
  408.      Function key 9       k9         stuff \033[20~
  409.      Function key 10      k;         stuff \033[21~
  410.      Function key 11      F1         stuff \033[22~
  411.      Function key 12      F2         stuff \033[23~
  412.      Backspace            kb         stuff \010
  413.      Home                 kh         stuff \033[1~
  414.      End                  kH         stuff \033[4~
  415.      Insert               kI         stuff \033[2~
  416.      Delete               kD         stuff \033[3~
  417.      Page up              kP         stuff \033[5~
  418.      Page down            kN         stuff \033[6~
  419.      Keypad 0             f0         stuff 0
  420.                                      stuff \033Op      (A)
  421.      Keypad 1             f1         stuff 1
  422.                                      stuff \033Oq      (A)
  423.      Keypad 2             f2         stuff 2
  424.                                      stuff \033Or      (A)
  425.      Keypad 3             f3         stuff 3
  426.                                      stuff \033Os      (A)
  427.      Keypad 4             f4         stuff 4
  428.                                      stuff \033Ot      (A)
  429.      Keypad 5             f5         stuff 5
  430.                                      stuff \033Ou      (A)
  431.      Keypad 6             f6         stuff 6
  432.                                      stuff \033Ov      (A)
  433.      Keypad 7             f7         stuff 7
  434.                                      stuff \033Ow      (A)
  435.      Keypad 8             f8         stuff 8
  436.                                      stuff \033Ox      (A)
  437.      Keypad 9             f9         stuff 9
  438.                                      stuff \033Oy      (A)
  439.      Keypad +             f+         stuff +
  440.                                      stuff \033Ok      (A)
  441.      Keypad -             f-         stuff -
  442.                                      stuff \033Om      (A)
  443.      Keypad *             f*         stuff *
  444.                                      stuff \033Oj      (A)
  445.      Keypad /             f/         stuff /
  446.                                      stuff \033Oo      (A)
  447.      Keypad =             fq         stuff =
  448.                                      stuff \033OX      (A)
  449.      Keypad .             f.         stuff .
  450.                                      stuff \033On      (A)
  451.      Keypad ,             f,         stuff ,
  452.                                      stuff \033Ol      (A)
  453.      Keypad enter         fe         stuff \015
  454.                                      stuff \033OM      (A)
  455. File: screen.info,  Node: Digraph,  Next: Bell,  Prev: Input Translation,  Up: Virtual Terminal
  456. Digraph
  457. =======
  458.  - Command: digraph [PRESET]
  459.      (none)
  460.      This command prompts the user for a digraph sequence. The next two
  461.      characters typed are looked up in a builtin table and the
  462.      resulting character is inserted in the input stream. For example,
  463.      if the user enters `a"', an a-umlaut will be inserted. If the
  464.      first character entered is a 0 (zero), `screen' will treat the
  465.      following charcters (up to three) as an octal number instead.  The
  466.      optional argument PRESET is treated as user input, thus one can
  467.      create an "umlaut" key.  For example the command `bindkey ^K
  468.      digraph '"'' enables the user to generate an a-umlaut by typing
  469.      `CTRL-K a'.
  470. File: screen.info,  Node: Bell,  Next: Clear,  Prev: Digraph,  Up: Virtual Terminal
  471.  - Command: bell_msg [MESSAGE]
  472.      (none)
  473.      When a bell character is sent to a background window, `screen'
  474.      displays a notification in the message line.  The notification
  475.      message can be re-defined by means of the `bell' command.  Each
  476.      occurrence of `%' in MESSAGE is replaced by the number of the
  477.      window to which a bell has been sent, and each occurrence of `~'
  478.      is replaced by the definition for bell in your termcap (usually an
  479.      audible bell).  The default message is
  480.           'Bell in window %'
  481.      An empty message can be supplied to the `bell_msg' command to
  482.      suppress output of a message line (`bell_msg ""').
  483.  - Command: vbell [STATE]
  484.      (`C-a C-g')
  485.      Sets or toggles the visual bell setting for the current window. If
  486.      `vbell' is switched to `on', but your terminal does not support a
  487.      visual bell, the visual bell message is displayed in the status
  488.      line when the bell character is received.  Visual bell support of
  489.      a terminal is defined by the termcap variable `vb'. *Note Visual
  490.      Bell: (termcap)Bell, for more information on visual bells.  The
  491.      equivalent terminfo capability is `flash'.
  492.      Per  default, `vbell' is `off', thus the audible bell is used.
  493.  - Command: vbell_msg [MESSAGE]
  494.      (none)
  495.      Sets the visual bell message. MESSAGE is printed to the status
  496.      line if the window receives a bell character (^G), `vbell' is set
  497.      to `on' and the terminal does not support a visual bell.  The
  498.      default message is `Wuff, Wuff!!'.  Without parameter, the current
  499.      message is shown.
  500.  - Command: vbellwait SEC
  501.      (none)
  502.      Define a delay in seconds after each display of `screen' 's visual
  503.      bell message. The default is 1 second.
  504. File: screen.info,  Node: Clear,  Next: Info,  Prev: Bell,  Up: Virtual Terminal
  505. Clear
  506. =====
  507.  - Command: clear
  508.      (`C-a C')
  509.      Clears the screen and saves its contents to the scrollback buffer.
  510. File: screen.info,  Node: Info,  Next: Redisplay,  Prev: Clear,  Up: Virtual Terminal
  511.  - Command: info
  512.      (`C-a i', `C-a C-i')
  513.      Uses the message line to display some information about the current
  514.      window: the cursor position in the form `(COLUMN,ROW)' starting
  515.      with `(1,1)', the terminal width and height plus the size of the
  516.      scrollback buffer in lines, like in `(80,24)+50', various flag
  517.      settings (flow-control, insert mode, origin mode, wrap mode,
  518.      application-keypad mode, output logging, activity monitoring, and
  519.      redraw (`+' indicates enabled, `-' not)), the currently active
  520.      character set (`G0', `G1', `G2', or `G3'), and in square brackets
  521.      the terminal character sets that are currently designated as `G0'
  522.      through `G3'.  For system information use `time'.
  523. File: screen.info,  Node: Redisplay,  Next: Wrap,  Prev: Info,  Up: Virtual Terminal
  524. Redisplay
  525. =========
  526.  - Command: allpartial STATE
  527.      (none)
  528.      If set to on, only the current cursor line is refreshed on window
  529.      change.  This affects all windows and is useful for slow terminal
  530.      lines. The previous setting of full/partial refresh for each
  531.      window is restored with `allpartial off'. This is a global flag
  532.      that immediately takes effect on all windows overriding the
  533.      `partial' settings. It does not change the default redraw
  534.      behaviour of newly created windows.
  535.  - Command: partial STATE
  536.      (none)
  537.      Defines whether the display should be refreshed (as with
  538.      `redisplay') after switching to the current window. This command
  539.      only affects the current window.  To immediately affect all
  540.      windows use the `allpartial' command.  Default is `off', of
  541.      course.  This default is fixed, as there is currently no
  542.      `defpartial' command.
  543.  - Command: redisplay
  544.      (`C-a l', `C-a C-l')
  545.      Redisplay the current window.  Needed to get a full redisplay in
  546.      partial redraw mode.
  547. File: screen.info,  Node: Wrap,  Next: Reset,  Prev: Redisplay,  Up: Virtual Terminal
  548.  - Command: wrap STATE
  549.      (`C-a r', `C-a C-r')
  550.      Sets the line-wrap setting for the current window.  When line-wrap
  551.      is on, the second consecutive printable character output at the
  552.      last column of a line will wrap to the start of the following
  553.      line.  As an added feature, backspace (^H) will also wrap through
  554.      the left margin to the previous line.  Default is `on'.
  555.  - Command: defwrap STATE
  556.      (none)
  557.      Same as the `wrap' command except that the default setting for new
  558.      windows is changed. Initially line-wrap is on and can be toggled
  559.      with the `wrap' command (`C-a r') or by means of "C-a : wrap
  560.      on|off".
  561. File: screen.info,  Node: Reset,  Next: Window Size,  Prev: Wrap,  Up: Virtual Terminal
  562. Reset
  563. =====
  564.  - Command: reset
  565.      (`C-a Z')
  566.      Reset the virtual terminal to its "power-on" values. Useful when
  567.      strange settings (like scroll regions or graphics character set)
  568.      are left over from an application.
  569. File: screen.info,  Node: Window Size,  Next: Character Processing,  Prev: Reset,  Up: Virtual Terminal
  570. Window Size
  571. ===========
  572.  - Command: width [NUM]
  573.      (`C-a W')
  574.      Toggle the window width between 80 and 132 columns, or set it to
  575.      NUM columns if an argument is specified.  This requires a capable
  576.      terminal and the termcap entries `Z0' and `Z1'.  See the `termcap'
  577.      command (*note Termcap::.), for more information.
  578.  - Command: height [LINES]
  579.      (none)
  580.      Set the display height to a specified number of lines. When no
  581.      argument is given it toggles between 24 and 42 lines display.
  582. File: screen.info,  Node: Character Processing,  Prev: Window Size,  Up: Virtual Terminal
  583. Character Processing
  584. ====================
  585.  - Command: c1 [STATE]
  586.      (none)
  587.      Change c1 code processing. `c1 on' tells screen to treat the input
  588.      characters between 128 and 159 as control functions.  Such an
  589.      8-bit code is normally the same as ESC followed by the
  590.      corresponding 7-bit code. The default setting is to process c1
  591.      codes and can be changed with the `defc1' command.  Users with
  592.      fonts that have usable characters in the c1 positions may want to
  593.      turn this off.
  594.  - Command: gr [STATE]
  595.      (none)
  596.      Turn GR charset switching on/off. Whenever screens sees an input
  597.      char with an 8th bit set, it will use the charset stored in the GR
  598.      slot and print the character with the 8th bit stripped. The
  599.      default (see also `defgr') is not to process GR switching because
  600.      otherwise the ISO88591 charset would not work.
  601.  - Command: kanji WTYPE [DTYPE]
  602.      (none)
  603.      Tell screen how to process kanji input/output. WTYPE and DTYPE
  604.      must be one of the strings `jis', `euc' or `sjis'. The first
  605.      argument sets the kanji type of the current window. Each window
  606.      can emulate a different type. The optional second parameter tells
  607.      screen how to write the kanji codes to the connected terminal. The
  608.      preferred method of setting the display type is to use the `KJ'
  609.      termcap entry. *Note Special Capabilities::.  See also `defkanji',
  610.      which changes the default setting of a new window.
  611.  - Command: charset SET
  612.      (none)
  613.      Change the current character set slot designation and charset
  614.      mapping.  The first four character of SET are treated as charset
  615.      designators while the fifth and sixth character must be in range
  616.      `0' to `3' and set the GL/GR charset mapping. On every position a
  617.      `.' may be used to indicate that the corresponding charset/mapping
  618.      should not be changed (SET is padded to six characters internally
  619.      by appending `.' chars). New windows have `BBBB02' as default
  620.      charset, unless a `kanji' command is active.
  621.      The current setting can be viewed with the *Note Info:: command.
  622.  - Command: defc1 STATE
  623.      (none)
  624.      Same as the `c1' command except that the default setting for new
  625.      windows is changed. Initial setting is `on'.
  626.  - Command: defgr STATE
  627.      (none)
  628.      Same as the `gr' command except that the default setting for new
  629.      windows is changed. Initial setting is `off'.
  630.  - Command: defkanji WTYPE
  631.      (none)
  632.      Same as the `kanji' command except that the default setting for
  633.      new windows is changed. Initial setting is `off', i.e. `jis'.
  634.  - Command: defcharset [SET]
  635.      Like the `charset' command except that the default setting for new
  636.      windows is changed. Shows current default if called without
  637.      argument.
  638. File: screen.info,  Node: Copy and Paste,  Next: Subprocess Execution,  Prev: Virtual Terminal,  Up: Top
  639. Copy and Paste
  640. **************
  641.    For those confined to a hardware terminal, these commands provide a
  642. cut and paste facility more powerful than those provided by most
  643. windowing systems.
  644. * Menu:
  645. * Copy::                        Copy from scrollback to buffer
  646. * Paste::                       Paste from buffer into window
  647. * Registers::                   Longer-term storage
  648. * Screen-Exchange::             Sharing data between screen users
  649. * History::                     Recalling previous input
  650. File: screen.info,  Node: Copy,  Next: Paste,  Up: Copy and Paste
  651. Copying
  652. =======
  653.  - Command: copy
  654.      (`C-a [', `C-a C-[', `C-a ESC')
  655.      Enter copy/scrollback mode. This allows you to copy text from the
  656.      current window and its history into the paste buffer. In this mode
  657.      a `vi'-like full screen editor is active, with controls as
  658.      outlined below.
  659. * Menu:
  660. * Line Termination::            End copied lines with CR/LF
  661. * Scrollback::                  Set the size of the scrollback buffer
  662. * Copy Mode Keys::              Remap keys in copy mode
  663. * Movement::                    Move around in the scrollback buffer
  664. * Marking::                     Select the text you want
  665. * Repeat count::                Repeat a command
  666. * Searching::                   Find the text you want
  667. * Specials::                    Other random keys
  668. File: screen.info,  Node: Line Termination,  Next: Scrollback,  Up: Copy
  669. CR/LF
  670. -----
  671.  - Command: crlf [STATE]
  672.      (none)
  673.      This affects the copying of text regions with the `C-a [' command.
  674.      If it is set to `on', lines will be separated by the two character
  675.      sequence `CR'/`LF'.  Otherwise only `LF' is used.  `crlf' is off
  676.      by default.  When no parameter is given, the state is toggled.
  677. File: screen.info,  Node: Scrollback,  Next: Copy Mode Keys,  Prev: Line Termination,  Up: Copy
  678. Scrollback
  679. ----------
  680.  - Command: defscrollback NUM
  681.      (none)
  682.      Same as the `scrollback' command except that the default setting
  683.      for new windows is changed.  Defaults to 100.
  684.  - Command: scrollback NUM
  685.      (none)
  686.      Set the size of the scrollback buffer for new windows to NUM
  687.      lines.  The default scrollback is 100 lines.  Use `C-a i' to view
  688.      the current setting.
  689. File: screen.info,  Node: Copy Mode Keys,  Next: Movement,  Prev: Scrollback,  Up: Copy
  690. markkeys
  691. --------
  692.  - Command: markkeys STRING
  693.      (none)
  694.      This is a method of changing the keymap used for copy/history
  695.      mode.  The string is made up of OLDCHAR=NEWCHAR pairs which are
  696.      separated by `:'. Example: The command `markkeys h=^B:l=^F:$=^E'
  697.      would set some keys to be more familiar to `emacs' users.  If your
  698.      terminal sends characters, that cause you to abort copy mode, then
  699.      this command may help by binding these characters to do nothing.
  700.      The no-op character is `' and is used like this: `markkeys @=L=H'
  701.      if you do not want to use the `H' or `L' commands any longer.  As
  702.      shown in this example, multiple keys can be assigned to one
  703.      function in a single statement.
  704. File: screen.info,  Node: Movement,  Next: Marking,  Prev: Copy Mode Keys,  Up: Copy
  705. Movement Keys
  706. -------------
  707. `h', `j', `k', `l' move the cursor line by line or column by column.
  708. `0', `^' and `$' move to the leftmost column or to the first or last
  709. non-whitespace character on the line.
  710. `H', `M' and `L' move the cursor to the leftmost column of the top,
  711. center or bottom line of the window.
  712. `+' and `-' move the cursor to the leftmost column of the next or
  713. previous line.
  714. `G' moves to the specified absolute line (default: end of buffer).
  715. `|' moves to the specified absolute column.
  716. `w', `b', `e' move the cursor word by word.
  717. `C-u' and `C-d' scroll the display up/down by the specified amount of
  718. lines while preserving the cursor position. (Default: half screenfull).
  719. `C-b' and `C-f' move the cursor up/down a full screen.
  720. `g' moves to the beginning of the buffer.
  721. `%' jumps to the specified percentage of the buffer.
  722.    Note that Emacs-style movement keys can be specified by a .screenrc
  723. command. (`markkeys "h=^B:l=^F:$=^E"') There is no simple method for a
  724. full emacs-style keymap, however, as this involves multi-character
  725. codes.
  726. File: screen.info,  Node: Marking,  Next: Repeat count,  Prev: Movement,  Up: Copy
  727. Marking
  728. -------
  729.    The copy range is specified by setting two marks. The text between
  730. these marks will be highlighted. Press `space' to set the first or
  731. second mark respectively.
  732. `Y' and `y' can be used to mark one whole line or to mark from start of
  733. line.
  734. `W' marks exactly one word.
  735. File: screen.info,  Node: Repeat count,  Next: Searching,  Prev: Marking,  Up: Copy
  736. Repeat Count
  737. ------------
  738.    Any command in copy mode can be prefixed with a number (by pressing
  739. digits `0...9') which is taken as a repeat count. Example: `C-a C-[ H
  740. 10 j 5 Y' will copy lines 11 to 15 into the paste buffer.
  741. File: screen.info,  Node: Searching,  Next: Specials,  Prev: Repeat count,  Up: Copy
  742. Searching
  743. ---------
  744. `/' `vi'-like search forward.
  745. `?' `vi'-like search backward.
  746. `C-a s' `emacs' style incremental search forward.
  747. `C-r' `emacs' style reverse i-search.
  748. File: screen.info,  Node: Specials,  Prev: Searching,  Up: Copy
  749. Specials
  750. --------
  751.    There are, however, some keys that act differently here from in
  752. `vi'.  `Vi' does not allow to yank rectangular blocks of text, but
  753. `screen' does. Press
  754. `c' or `C' to set the left or right margin respectively. If no repeat
  755. count is given, both default to the current cursor position.
  756. Example: Try this on a rather full text screen: `C-a [ M 20 l SPACE c
  757. 10 l 5 j C SPACE'.
  758. This moves one to the middle line of the screen, moves in 20 columns
  759. left, marks the beginning of the paste buffer, sets the left column,
  760. moves 5 columns down, sets the right column, and then marks the end of
  761. the paste buffer. Now try:
  762. `C-a [ M 20 l SPACE 10 l 5 j SPACE'
  763. and notice the difference in the amount of text copied.
  764. `J' joins lines. It toggles between 3 modes: lines separated by a
  765. newline character (012), lines glued seamless, or lines separated by a
  766. single space. Note that you can prepend the newline character with a
  767. carriage return character, by issuing a `set crlf on'.
  768. `v' is for all the `vi' users who use `:set numbers' - it toggles the
  769. left margin between column 9 and 1.
  770. `a' before the final space key turns on append mode. Thus the contents
  771. of the paste buffer will not be overwritten, but appended to.
  772. `A' turns on append mode and sets a (second) mark.
  773. `>' sets the (second) mark and writes the contents of the paste buffer
  774. to the screen-exchange file (`/tmp/screen-exchange' per default) once
  775. copy-mode is finished.  *Note Screen-Exchange::.
  776. This example demonstrates how to dump the whole scrollback buffer to
  777. that file:
  778. `C-a [ g SPACE G $ >'.
  779. `C-g' gives information about the current line and column.
  780. `x' exchanges the first mark and the current cursor position. You can
  781. use this to adjust an already placed mark.
  782. `@' does nothing.  Absolutely nothing.  Does not even exit copy mode.
  783. All keys not described here exit copy mode.
  784. File: screen.info,  Node: Paste,  Next: Registers,  Prev: Copy,  Up: Copy and Paste
  785. Paste
  786. =====
  787.  - Command: paste [REGISTERS [DESTINATION]]
  788.      (`C-a ]', `C-a C-]')
  789.      Write the (concatenated) contents of the specified registers to
  790.      the stdin stream of the current window.  The register `.' is
  791.      treated as the paste buffer. If no parameter is specified the user
  792.      is prompted to enter a single register. The paste buffer can be
  793.      filled with the `copy', `history' and `readbuf' commands.  Other
  794.      registers can be filled with the `register', `readreg' and `paste'
  795.      commands.  If `paste' is called with a second argument, the
  796.      contents of the specified registers is pasted into the named
  797.      destination register rather than the window. If `.' is used as the
  798.      second argument, the display's paste buffer is the destination.
  799.      Note, that `paste' uses a wide variety of resources: Usually both,
  800.      a current window and a current display are required. But whenever
  801.      a second argument is specified no current window is needed. When
  802.      the source specification only contains registers (not the paste
  803.      buffer) then there need not be a current display (terminal
  804.      attached), as the registers are a global resource. The paste
  805.      buffer exists once for every user.
  806.  - Command: pastefont [STATE]
  807.      Tell screen to include font information in the paste buffer. The
  808.      default is not to do so. This command is especially usefull for
  809.      multi character fonts like kanji.
  810.  - Command: slowpaste MSEC
  811.      (none)
  812.      Define the speed text is inserted by the `paste' command.  If the
  813.      slowpaste value is nonzero text is written character by character.
  814.      `screen' will pause for MSEC milliseconds after each write to
  815.      allow the application to process the input. only use `slowpaste' if
  816.      your underlying system exposes flow control problems while pasting
  817.      large amounts of text.
  818.  - Command: readreg [REGISTER [FILENAME]]
  819.      (none)
  820.      Does one of two things, dependent on number of arguments: with
  821.      zero or one arguments it it duplicates the paste buffer contents
  822.      into the register specified or entered at the prompt. With two
  823.      arguments it reads the contents of the named file into the
  824.      register, just as `readbuf' reads the screen-exchange file into
  825.      the paste buffer.  The following example will paste the system's
  826.      password file into the screen window (using register p, where a
  827.      copy remains):
  828.           C-a : readreg p /etc/passwd
  829.           C-a : paste p
  830. File: screen.info,  Node: Registers,  Next: Screen-Exchange,  Prev: Paste,  Up: Copy and Paste
  831. Registers
  832. =========
  833.  - Command: copy_reg [KEY]
  834.      (none)
  835.      Removed. Use `readreg' instead.
  836.  - Command: ins_reg [KEY]
  837.      (none)
  838.      Removed. Use `paste' instead.
  839.  - Command: process [KEY]
  840.      (none)
  841.      Stuff the contents of the specified register into the `screen'
  842.      input queue. If no argument is given you are prompted for a
  843.      register name. The text is parsed as if it had been typed in from
  844.      the user's keyboard. This command can be used to bind multiple
  845.      actions to a single key.
  846.  - Command: register KEY STRING
  847.      (none)
  848.      Save the specified STRING to the register KEY.
  849.  - Command: stuff STRING
  850.      (none)
  851.      Stuff the string STRING in the input buffer of the current window.
  852.      This is like the `paste' command, but with much less overhead.
  853.      You cannot paste large buffers with the `stuff' command. It is most
  854.      useful for key bindings. *Note Bindkey::
  855. File: screen.info,  Node: Screen-Exchange,  Next: History,  Prev: Registers,  Up: Copy and Paste
  856. Screen-Exchange
  857. ===============
  858.  - Command: bufferfile [EXCHANGE-FILE]
  859.      (none)
  860.      Change the filename used for reading and writing with the paste
  861.      buffer.  If the EXCHANGE-FILE parameter is omitted, `screen'
  862.      reverts to the default of `/tmp/screen-exchange'.  The following
  863.      example will paste the system's password file into the screen
  864.      window (using the paste buffer, where a copy remains):
  865.           C-a : bufferfile /etc/passwd
  866.           C-a < C-a ]
  867.           C-a : bufferfile
  868.  - Command: readbuf
  869.      (`C-a <')
  870.      Reads the contents of the current screen-exchange file into the
  871.      paste buffer.
  872.  - Command: removebuf
  873.      (`C-a =')
  874.      Unlinks the screen-exchange file.
  875.  - Command: writebuf
  876.      (`C-a >')
  877.      Writes the contents of the paste buffer to a public accessible
  878.      screen-exchange file. This is thought of as a primitive means of
  879.      communication between `screen' users on the same host. See also
  880.      `C-a ESC' (*note Copy::.).
  881. File: screen.info,  Node: History,  Prev: Screen-Exchange,  Up: Copy and Paste
  882. History
  883. =======
  884.  - Command: history
  885.      (`C-a {')
  886.      Usually users work with a shell that allows easy access to previous
  887.      commands.  For example, `csh' has the command `!!' to repeat the
  888.      last command executed.  `screen' provides a primitive way of
  889.      recalling "the command that started ...": You just type the first
  890.      letter of that command, then hit `C-a {' and `screen' tries to
  891.      find a previous line that matches with the prompt character to the
  892.      left of the cursor. This line is pasted into this window's input
  893.      queue.  Thus you have a crude command history (made up by the
  894.      visible window and its scrollback buffer).
  895. File: screen.info,  Node: Subprocess Execution,  Next: Key Binding,  Prev: Copy and Paste,  Up: Top
  896. Subprocess Execution
  897. ********************
  898.    Control Input or Output of a window by another filter process.  Use
  899. with care!
  900. * Menu:
  901. * Exec::                        The `exec' command syntax.
  902. * Using Exec::                  Weird things that filters can do.
  903. File: screen.info,  Node: Exec,  Next: Using Exec,  Up: Subprocess Execution
  904.  - Command: exec [[FDPAT] NEWCOMMAND [ARGS ... ]]
  905.      (none)
  906.      Run a unix subprocess (specified by an executable path NEWCOMMAND
  907.      and its optional arguments) in the current window. The flow of
  908.      data between newcommand's stdin/stdout/stderr, the process already
  909.      running (shell) and screen itself (window) is controlled by the
  910.      filedescriptor pattern FDPAT.  This pattern is basically a three
  911.      character sequence representing stdin, stdout and stderr of
  912.      newcommand. A dot (`.') connects the file descriptor to screen. An
  913.      exclamation mark (`!') causes the file descriptor to be connected
  914.      to the already running process. A colon (`:') combines both.
  915.      User input will go to newcommand unless newcommand requests the
  916.      old process' output (FDPATs first character is `!' or `:') or a
  917.      pipe symbol (`|') is added to the end of FDPAT.
  918.      Invoking `exec' without arguments shows name and arguments of the
  919.      currently running subprocess in this window.
  920.      When a subprocess is running the `kill' command will affect it
  921.      instead of the window's process.
  922.      Refer to the postscript file `doc/fdpat.ps' for a confusing
  923.      illustration of all 21 possible combinations. Each drawing shows
  924.      the digits 2, 1, 0 representing the three file descriptors of
  925.      newcommand. The box marked `W' is usual pty that has the
  926.      application-process on its slave side.  The box marked `P' is the
  927.      secondary pty that now has screen at its master side.
  928. File: screen.info,  Node: Using Exec,  Prev: Exec,  Up: Subprocess Execution
  929. Using Exec
  930. ==========
  931. Abbreviations:
  932.    * Whitespace between the word `exec' and FDPAT and the command name
  933.      can be omitted.
  934.    * Trailing dots and a FDPAT consisting only of dots can be omitted.
  935.    * A simple `|' is synonymous for the `!..|' pattern.
  936.    * The word `exec' can be omitted when the `|' abbreviation is used.
  937.    * The word `exec' can always be replaced by leading `!'.
  938. Examples:
  939. `!/bin/sh'
  940. `exec /bin/sh'
  941. `exec ... /bin/sh'
  942.      Creates another shell in the same window, while the original shell
  943.      is still running. Output of both shells is displayed and user
  944.      input is sent to the new `/bin/sh'.
  945. `!!stty 19200'
  946. `exec!stty 19200'
  947. `exec !.. stty 19200'
  948.      Set the speed of the window's tty. If your stty command operates
  949.      on stdout, then add another `!'. This is a useful command, when a
  950.      screen window is directly connected to a serial line that needs to
  951.      be configured.
  952. `|less'
  953. `exec !..| less'
  954.      This adds a pager to the window output. The special character `|'
  955.      is needed to give the user control over the pager although it gets
  956.      its input from the window's process. This works, because `less'
  957.      listens on stderr (a behavior that `screen' would not expect
  958.      without the `|') when its stdin is not a tty. `Less' versions
  959.      newer than 177 fail miserably here; good old `pg' still works.
  960. `!:sed -n s/.*Error.*/\007/p'
  961.      Sends window output to both, the user and the sed command. The sed
  962.      inserts an additional bell character (oct. 007) to the window
  963.      output seen by screen.  This will cause 'Bell in window x'
  964.      messages, whenever the string `Error' appears in the window.
  965.